public class Student {
    private String name;
    private String gender;
    private int age;
    private double score;
    private static String classRoom = "a123";

    //构造代码块，一般用于初始化实例成员变量。
    {
        this.name = "张三";
        this.gender = "男";
        this.age = 18;
        this.score = 4.0;
        System.out.println("调用构造代码块/实例化代码块/非静态代码块");
    }

    public void show(){
        System.out.println("name: "+name+" gender: "+gender+" age: "+age);
    }

    public static void main(String[] args) {
        Student s = new Student();
        s.show();
    }
}
